/*
 * Copyright 2013-2019 Xia Jun(3979434@qq.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ***************************************************************************************
 *                                                                                     *
 *                        Website : http://www.farsunset.com                           *
 *                                                                                     *
 ***************************************************************************************
 */
package com.farsunset.cim.entity;

import javax.persistence.*;
import java.io.Serializable;

@Entity @Table(name = "T_CYCLE_LOCATION") public class CycleLocation implements Serializable {

    private static final transient long serialVersionUID = 1L;

    /**
     * 数据库主键ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "T_CYCLE_LOCATION_SEQ")
    @SequenceGenerator(name = "T_CYCLE_LOCATION_SEQ", sequenceName = "T_CYCLE_LOCATION_SEQ", allocationSize = 1)
    @Column(name = "id") private Long id;

    /**
     * session绑定的用户账号
     */
    @Column(name = "u_id") private String uid;

    /**
     * session在本台服务器上的ID
     */
    @Column(name = "nid", length = 32, nullable = false) private String nid;

    /**
     * session绑定的服务器IP
     */
    @Column(name = "host", length = 15, nullable = false) private String host;

    /**
     * 位置上报时间
     */
    @Column(name = "report_time") private Long reportTime;

    /**
     * 经度
     */
    @Column(name = "longitude") private Double longitude;

    /**
     * 维度
     */
    @Column(name = "latitude") private Double latitude;

    /**
     * 位置
     */
    @Column(name = "location") private String location;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getNid() {
        return nid;
    }

    public void setNid(String nid) {
        this.nid = nid;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Long getReportTime() {
        return reportTime;
    }

    public void setReportTime(Long reportTime) {
        this.reportTime = reportTime;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }
}
